#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int Fiun(int num)
{
	int sum = 0;

	int a = 0;
	int b = 1;
	if (num == 2||num == 1)
	{
		return 1;
	}
	for (int i =2;i<num;i++)
	{
		int tmp = a;
		a = b;

		b = tmp + b;

		sum = a + b;


	}
	return sum;
}

int main()
{
	int num = 0;
	scanf("%d", &num);
	int sum = Fiun(num);
	printf("%d", sum);

	return 0;
}